#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	float x, y, z;
	scanf("%f,%f", &x, &y);
	z = x / y;
	while (1)
	{
		if (fabs(z) > 1.0)
		{
			x = y;
			y = z;
			z = x / y;
		}
		else
			break;
	}
	printf("%.2f\n", y);
	return 0;
}